package com.TestDemo.Test2;

public class TestStaticAndInstance {

    public int id;
    public String name;
    public static  int sid;
    public static String sname;


    public static void main(String[] args) {
        TestStaticAndInstance testStaticAndInstance = new TestStaticAndInstance();

            int i = testStaticAndInstance.id;
            int i1 = testStaticAndInstance.sid;

            method2();
            method4();

            testStaticAndInstance.method1();
            testStaticAndInstance.method3();

            testStaticAndInstance.method2();
            testStaticAndInstance.method4();

    }

    public void method1(){
        System.out.println("进入----->method1");
        method2();
        System.out.println("method1");
    }

    public static void method2(){
        System.out.println("进入----->method2");
        method4();

        System.out.println("method2");
    }


    public void method3(){
        System.out.println("进入----->method3");
        System.out.println("method3");
    }

    public static void method4(){
        System.out.println("进入----->method4");
        System.out.println("method4");
    }


}
